let util = {

};
util.title = function (title) {
    title = title ? title + ' - Home' : '混沌大学北京分社';
    window.document.title = title;
};
util.URL=function(){
  return  "http://hundun.dakashuo.com"
}
util.datatime=function(times){
   let date = new Date(times);
    let year = date.getFullYear();
    let month = date.getMonth()+1;
    let day = date.getDate();
    month = month < 10 ? "0"+month:month;
    day = day < 10 ? "0"+day:day;
    date = year+'-'+month+'-'+day;
    return date;
};
util.day=function(tim){
  var min=Math.floor(tim%3600);
  let datahous=Math.floor(Math.floor(tim/3600) /24)+ "天" +Math.floor(tim/3600%24) + "小时" + Math.floor(min/60) + "分"+ tim%60 + "秒";
    return datahous;
}
// 当前时间戳-----------
util.timeStamp=function(){

   var nowdate=Math.round(new Date() / 1000);
  return nowdate
}
util.datahours=function(tim){
    var min=Math.floor(tim%3600);
  let datahous=Math.floor(tim/3600) + "小时" + Math.floor(min/60) + "分"+ tim%60 + "秒";
    return datahous;
}
export default util;